package com.td.spring.aop;

import org.aopalliance.aop.Advice;

/**
 * @author td
 * @date 2018/6/4
 */
public class AspectJExpressionPointcutAdvisor implements PointcutAdvisor {

    private AspectJExpressionPointcut pointcut = new AspectJExpressionPointcut();

    private Advice advisor;

    public void setAdvisor(Advice advisor) {
        this.advisor = advisor;
    }

    public void setExpression(String expression) {
        this.pointcut.setExpression(expression);
    }

    @Override
    public Pointcut getPointcut() {
        return pointcut;
    }

    @Override
    public Advice getAdvice() {
        return this.advisor;
    }
}
